﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DoubleH.Utility
{
    /// <summary>
    /// TextInput.xaml 的交互逻辑
    /// </summary>
    public partial class TextInputWindow : Window
    {
        public TextInputWindow()
        {
            InitializeComponent();

            InitEvent();
        }

        public void Init(string title, string text)
        {
            this.Title = title;
            textBox1.Text = text;
            textBox1.Focus();
        }

        private void InitEvent()
        {
            buttonOK.Click+=(ss,ee)=>this.Close();
        }

        public string Text
        {
            get { return textBox1.Text; }
        }
    }
}
